int close_file(int file)
{
	if (file < NUM_FILE_DESC)
	{
		if (runningProc->files[file] != 0)
		{
			OFT* fileToClose = runningProc->files[file];
			
			fileToClose->refCount--;
			put_inode(fileToClose->memInode);
			
			if (fileToClose->refCount == 0)
			{
				fileToClose->memInode = 0;
				runningProc->files[file] = 0;
			}
			return 1;
		}
		return 0;
	}
	return -1;
}

int do_close(char* notUsed)
{
	int fd = 0;
	
	printf("Close which FD?: ");
	scanf("%d", &fd);
	
	if (close_file(fd) != 1)
	{
		printf("Could not close file!\n\n");
		getchar();
		return -1;
	}
	putchar('\n');
	getchar();
	return 1;
}
